package com.damon.utils;

import java.util.concurrent.Executor;
import java.util.concurrent.Executors;
/**
 * 线程池工具类
 * @author 风蚕
 *
 */
public class ThreadPoolUtil {
	private static Executor executor = Executors.newFixedThreadPool(30);//固定大小线程池
	//缓存线程池，并重用，限制时间过长会释放，无大小限制，适合处理大量耗时小的任务
//	private static Executor executor = Executors.newCachedThreadPool();
	public static Executor getExecutor() {
		return executor;
	}

}
